package com.kaisa.activity.fragment;

import android.app.AlertDialog;
import android.content.Intent;
import android.view.View;
import android.widget.RelativeLayout;

import com.kaisa.activity.R;
import com.kaisa.activity.ui.CasaGoHome;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.ViewInject;

/**
 * Created by Administrator on 2015/12/12.
 * 凯撒管家
 */
@ContentView(R.layout.fragment_steward)
public class StewardFragmeng extends BaseFragment implements View.OnClickListener{
    @ViewInject(R.id.steward_dj)
    private RelativeLayout goHome;
    @ViewInject(R.id.steward_md)
    private RelativeLayout door;
    public static StewardFragmeng newInstance() {
        StewardFragmeng fragment = new StewardFragmeng();
        return fragment;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {
        goHome.setOnClickListener(this);
        door.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.steward_dj:
                Intent intent  = new Intent(getActivity(),CasaGoHome.class);
                startActivity(intent);
                break;
            case R.id.steward_md:
                AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
                builder.setMessage("当前分站下，没有门前地图");
                builder.setPositiveButton("确定", null);
                builder.show();
                break;
        }
    }
}
